package com.codecrane.core.util;

/**
 * Created by 752322896 on 2019/4/8.
 */
public enum OrderStatusEnum {
    未审核(1, "未审核"),
    审核中(2, "审核中"),
    审核通过(3, "审核通过"),
    拒绝(4, "拒绝");

    private int code;
    private String msg;

    OrderStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    /**
     * 根据充值类型获取充值的天数
     */
    public static String getStatus(int code) {
        for (OrderStatusEnum countryEnum : OrderStatusEnum.values()) {
            if (code == countryEnum.getCode()) {
                return countryEnum.getMsg();
            }
        }
        return "";
    }
}
